from django import forms
from django.forms import ModelForm
from .models import Feight


class myUserForm(forms.Form):
    uname = forms.CharField(label='Username')
    pwd = forms.CharField(label='Password')

class FeightForm(ModelForm):
    class Meta:
        model = Feight
        fields = ['room_titile', 'room_size', 'room_monet', 'room_address']
        labels = {
            'room_titile': '标题',
            'room_size': '大小',
            'room_monet': '价格',
            'room_address': '地址',
        }

class calForm(forms.Form):
    ce = [
        ('none', '请选择'),
        ('number','数字'),
        ('letter', '字母'),
        ('symbol', '字符'),
        ('mixture', '混合'),
        ('chinese', '中文'),
    ]
    choose = forms.CharField(label='choose', widget=forms.Select(choices=ce))
    number = forms.IntegerField(max_value=1000,min_value=1,label='number')